package chp10.score;

import java.util.Scanner;

public class TestScoreCalc {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        //输入成绩
        System.out.print("请输入语文成绩:");
        int chinese = input.nextInt();
        System.out.print("请输入英语成绩:");
        int english = input.nextInt();
        System.out.print("请输入数学成绩:");
        int math = input.nextInt();

        ScoreCalc scoreCalc = new ScoreCalc();
        scoreCalc.chinese = chinese;
        scoreCalc.english = english;
        scoreCalc.math = math;

        //展示结果
        scoreCalc.showTotal();
        scoreCalc.showAvg();
        System.out.println("---------------------");
        System.out.println("total is:" + scoreCalc.getTotal());
        System.out.println("avg is:" + scoreCalc.getAvg());
    }
}
